Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoneconcierge: debugging API ChainInfo #211

Merged
merged 11 commits into from
Nov 22, 2022

Conversation

SebastianElvis
Copy link
Member

This PR implements the API of getting the latest (non-BTC-finalised) chain info for a given chain ID. This API is useful for debugging.

@vitsalis getting BTC-submitted and BTC-confirmed chain info requires a lot more work (e.g., maintaining epoch status stuff in ZoneConcierge) and will only be helpful for debugging. I feel it's kind of not worth it. Wdyt?

Base automatically changed from zoneconcierge-api-fixes to dev November 22, 2022 08:29
Copy link
Member

@vitsalis vitsalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some more info on the response would be useful though.

It would be nice if the explorer provided a page that listed all of the checkpoints for a particular epoch along with the status, but since we don't have that requirement right now, no reason to implement it yet.

// QueryChainInfoResponse is response type for the Query/ChainInfo RPC method.
message QueryChainInfoResponse {
// chain_info is the info of the CZ
babylon.zoneconcierge.v1.ChainInfo chain_info = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we add further attributes here as with QueryFinalizedChainInfoResponse?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, epoch info and btc checkpoint info would be super useful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we add further attributes here as with QueryFinalizedChainInfoResponse?

Since this API is only for debugging, it would be overkill to add stuff like inclusion proofs to this API. At the moment as long as the query gives us latest chain info then it should be enough for debugging.

For example, epoch info and btc checkpoint info would be super useful.

Such a latest chain info can be in an epoch that hasn't ended yet. To have these info the epoch with this chain info has to be at least submitted.

@SebastianElvis
Copy link
Member Author

It would be nice if the explorer provided a page that listed all of the checkpoints for a particular epoch along with the status, but since we don't have that requirement right now, no reason to implement it yet.

Yeah that would be very useful. To this end the ZoneConcierge needs to keep track of 1) the last submitted epoch, 2) the last confirmed epoch, and 3) the last finalised epoch. With these values the existing ZoneConcierge module can provide this functionality. Will add an issue for this 👍

@SebastianElvis SebastianElvis merged commit 86ba992 into dev Nov 22, 2022
@SebastianElvis SebastianElvis deleted the zoneconcierge-api-debug-chaininfo branch November 22, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants